from django.db import models

# Create your models here.
class QuestionType(models.Model):
    question_type= models.CharField(max_length = 20)
    def __str__(self):
        return self.question_type
class Question(models.Model):
    question_type = models.ForeignKey(QuestionType,on_delete=models.CASCADE)
    quetion_text = models.CharField(max_length=10000)
class Choice(models.Model):
    question = models.ForeignKey(Question,on_delete = models.CASCADE)
    choice_text = models.CharField(max_length = 1000)
    def __str__(self):
        return self.choice_text
class Answer(models.Model):
    question = models.ForeignKey(Question,on_delete=models.CASCADE)
    answer_text = models.CharField(max_length=1000)
    def __str__(self):
        return self.answer_text
